﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="java.util.regex.Matcher" import="java.util.regex.Pattern" %>
<%@ page import="ookweb.*"%>
<%@ include file="head.jsp" %> 
<% String menu=request.getParameter("m");
if("".equals(menu) || "null".equals(menu) || menu==null){
   menu="1";
}
String  tmp="";
%>
<div class="area">
 <%@ include file="top21.jsp" %> 
 <table width="100%" border="0" cellpadding="0" cellspacing="0">
   <tr>
     <td width="13"></td>
     <td width="746" height="640" align="center" valign="top">
     <table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="45%" height="55" align="center" valign="top"><a href="index.jsp"><img src="images/homelogo.gif" width="297" height="46" border=0 /></a></td>
    <td width="55%" valign="bottom"><img src="images/hometopbt.gif" width="204" height="20" style=" margin-bottom:12px;" /></td>
  </tr>
</table>

     <%@ include file="menu.jsp" %> 
     <div class="div8"></div>
     <table width="100%" border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td width="740" height="240" align="right">
          <%       String pj="2";  %>  
         <%@ include file="hdp2.jsp" %>
        </td>
       </tr>
     </table>
     <table width="100%" border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td  width="190" align="center" valign="top">
         <%String leftid="1"; %>
         <%@ include file="left.jsp" %>         </td>
         <td width="993" align="left" valign="top">
             <table width="100%" height="327" border="0" cellpadding="0" cellspacing="0" style="background:url(images/cptxtbj.gif) left repeat-y" >
             <tr >
               <td align="left" valign="top" >
             <%
             String iid=request.getParameter("iid");
              if("".equals(iid) || "null".equals(iid) || iid==null){
               iid="85";
              }
             
ResultSet rsc=null;
    if(iid!=null&&!"".equals(iid)){
rsc=con.getRs("select a.*,b.classname from web_info a left join web_infoclass b on a.classid=b.classid where a.iid="+iid);
     }
try{
     if(rsc.next()){ %> 
     <table width="100%" border="0" cellpadding="0" cellspacing="0">
                 <tr>
                   <td height="50" style="background:url(images/lanbt.gif) no-repeat" ><table width="100%" border="0">
                     <tr>
                       <td width="30%" height="26" valign="bottom" class="redbt"><%=rsc.getString("classname") %></td>
                       <td width="70%" align="right" valign="bottom"  class="locationstr"><!--<a href="<%=basePath%>">首页 </a>&gt; <%=rsc.getString("classname") %>--></td>
                     </tr>
                   </table></td>
                 </tr>
      </table>
      <div align="center" >
     <table width="80%" align=center border="0" cellpadding="8">
     <% 
     String title=rsc.getString("title");
     if(!("null".equals(title) || "".equals(title) || title==null)){ %>
	      <tr>
             <td align=left><br><div style="color:#C9000A;font=宋体; font-size:14px" align="center"><b><%=rsc.getString("title") %></b></div></td>
           </tr>
           <%} %>
           <tr>
             <td align=left><div class="txt"><%
             String pages=request.getParameter("pages");
             if("".equals(pages) || "null".equals(pages) || pages==null){
             pages="1";
             }
oracle.sql.CLOB clob=(oracle.sql.CLOB)rsc.getClob("content");
String content= Str.parse(clob);  

Pattern p= Pattern.compile("<div style=\"page-break-after: always;?\">\\s*<span style=\"display: none;?\">&nbsp;</span>\\s*</div>");
String[] arr=p.split(content);
int nums=arr.length;
if(nums>0){
content=arr[Integer.parseInt(pages)-1];
}
out.print(content);
 %></div>

 </td>
           </tr>
           <%if(nums>1){ %>
            <tr>
             <td align="center"> <div class="pagelist">
			 //rs add 20110710
			 <%out.print("概述:");%>
			  <%out.print(rsc.getString("info")); %>
			  <br>
			 <%String pagehtml=con.getPage(Integer.parseInt(pages),nums,nums,"?iid="+iid);
out.print(pagehtml); %></div></td>
           </tr>
           <%} %>
     </table>
    </div >
<% }
rsc.close();
}catch(Exception e){ }
%>
  </td>
             </tr>
           </table>  
  
         </td>
       </tr>
     </table>
     <%@ include file="bot2.jsp" %> </td>
<td width="209" valign="top" height="640" >        
        <%@ include file="right2.jsp" %>
     </td>
   </tr>
 </table>
</div>
 <%@ include file="foot.html" %>